package com.manner.groupon.controller.store;

import com.manner.groupon.common.BaseResponse;
import com.manner.groupon.model.entity.StoreAccountFlow;
import com.manner.groupon.service.store.StoreAccountFlowService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/store-flow")
@RequiredArgsConstructor
public class StoreFlowController {

    @Resource
    private StoreAccountFlowService storeAccountFlowService;

    @GetMapping("/phone/{phone}")
    public BaseResponse<List<StoreAccountFlow>> list(@PathVariable String phone) {
        return storeAccountFlowService.search(phone);
    }
}
